-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance: 通知の個別削除 #13399
enhance: 通知の個別削除 #13399
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #13399 +/- ##
============================================
- Coverage 77.46% 65.87% -11.59%
============================================
Files 184 986 +802
Lines 24725 114701 +89976
Branches 463 4287 +3824
============================================
+ Hits 19152 75559 +56407
- Misses 5566 39110 +33544
- Partials 7 32 +25 ☔ View full report in Codecov by Sentry. |
変な差分があるので消したい |
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -59173,6 +59173,163 @@
}
}
},
+ "/notifications/delete": {
+ "post": {
+ "operationId": "notifications/delete",
+ "summary": "notifications/delete",
+ "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:notifications*",
+ "externalDocs": {
+ "description": "Source code",
+ "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/notifications/delete.ts"
+ },
+ "tags": [
+ "notifications"
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "notificationId": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
+ "required": [
+ "notificationId"
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "204": {
+ "description": "OK (without any results)"
+ },
+ "400": {
+ "description": "Client error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "NO_SUCH_NOTIFICATION": {
+ "value": {
+ "error": {
+ "message": "No such notification.",
+ "code": "NO_SUCH_NOTIFICATION",
+ "id": "2bcf7352-eff1-4470-b5fb-97f1b0097832"
+ }
+ }
+ },
+ "INVALID_PARAM": {
+ "value": {
+ "error": {
+ "message": "Invalid param.",
+ "code": "INVALID_PARAM",
+ "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "CREDENTIAL_REQUIRED": {
+ "value": {
+ "error": {
+ "message": "Credential required.",
+ "code": "CREDENTIAL_REQUIRED",
+ "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Forbidden error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "AUTHENTICATION_FAILED": {
+ "value": {
+ "error": {
+ "message": "Authentication failed. Please ensure your token is correct.",
+ "code": "AUTHENTICATION_FAILED",
+ "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "418": {
+ "description": "I'm Ai",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "I_AM_AI": {
+ "value": {
+ "error": {
+ "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+ "code": "I_AM_AI",
+ "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ },
+ "examples": {
+ "INTERNAL_ERROR": {
+ "value": {
+ "error": {
+ "message": "Internal error occurred. Please contact us if the error persists.",
+ "code": "INTERNAL_ERROR",
+ "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/notifications/mark-all-as-read": {
"post": {
"operationId": "notifications/mark-all-as-read", |
MkNotifications、MkDateSeparatedListの中にMkNoteかXNotificationを持たせる実装になっており共通の実装を綺麗に持たせるのめんどいな…ってなっているがリファクタになると変更量が増えまくるのでどうしようかな(XNotificationが巨大なため) |
#13317 で入れないことがほぼ確定したのでこのPRは閉じる |
What
通知の個別削除のエンドポイントを作成した
Why
通知を削除する手段を提供する
Resolve #13317
Additional info (optional)
Checklist